package com.electronsys.emp.action;

import java.util.List;



import com.electronsys.emp.service.EmpDaoService;
import com.electronsys.pageBean.PageBean;
import com.electronsys.pojo.Employee;
import com.opensymphony.xwork2.ActionSupport;

public class EmpDaoAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1392304075811813744L;


	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public PageBean getPageBean() {
		return pageBean;
	}

	public void setPageBean(PageBean pageBean) {
		this.pageBean = pageBean;
	}
	public EmpDaoService empDaoService;
	public List<Employee> liem;
	
	private int page =1;
	private PageBean pageBean;
	

	@SuppressWarnings("unchecked")
	public String execute(){
		
		this.pageBean = empDaoService.queryForPage(5, page);
		liem = pageBean.getList();
		
		return "success";
	}

	public void setEmpDaoService(EmpDaoService empDaoService) {
		this.empDaoService = empDaoService;
	}
	public List<Employee> getLiem() {
		return liem;
	}
	public void setLiem(List<Employee> liem) {
		this.liem = liem;
	}
}
